/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcapi.entity;

import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonBackReference;

import com.easy.core.persistence.DataEntity;
import com.easy.common.utils.excel.annotation.ExcelField;

/**
 * 商品属性集Entity
 * @author waylen chi
 * @version 2018-01-17
 */
public class ApiAttrisets extends DataEntity<ApiAttrisets> {
	
	private static final long serialVersionUID = 1L;
	private Integer attrSid;		// attr_sid
	private ApiAttrisets parent;		// 父类ID,取自商品属性表 dfc_attributes
	private String attrSname;		// 属性名称
	private String attrDesc;		// 备注
	private Integer sortNo;		// 排序
	
	public ApiAttrisets() {
		super();
	}


	@NotNull(message="attr_sid不能为空")
	@ExcelField(title="attr_sid", align=2, sort=0)
	public Integer getAttrSid() {
		return attrSid;
	}

	public void setAttrSid(Integer attrSid) {
		this.attrSid = attrSid;
	}
	
	@JsonBackReference
	@ExcelField(title="父类ID,取自商品属性表 dfc_attributes", fieldType=ApiAttrisets.class, value="parent.name", align=2, sort=1)
	public ApiAttrisets getParent() {
		return parent;
	}

	public void setParent(ApiAttrisets parent) {
		this.parent = parent;
	}
	
	@ExcelField(title="属性名称", align=2, sort=2)
	public String getAttrSname() {
		return attrSname;
	}

	public void setAttrSname(String attrSname) {
		this.attrSname = attrSname;
	}
	
	@ExcelField(title="备注", align=2, sort=3)
	public String getAttrDesc() {
		return attrDesc;
	}

	public void setAttrDesc(String attrDesc) {
		this.attrDesc = attrDesc;
	}
	
	@ExcelField(title="排序", align=2, sort=4)
	public Integer getSortNo() {
		return sortNo;
	}

	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}
	
}